package com.sunyur.tailor.channel.service.inner.supplier.service;

import com.sunyur.tailor.channel.common.middle.base.ChannelListResult;
import com.sunyur.tailor.channel.common.middle.base.ChannelResult;
import com.sunyur.tailor.channel.service.inner.supplier.model.*;
import com.sunyur.tailor.channel.service.inner.supplier.param.*;

import java.util.List;

/**
 * @ClassName SunyurSupplier
 * @Description 商越供应商相关接口
 * @Author xuhui
 * @Date 2021/5/11 14:26
 * @Version 1.0
 */
public interface SunyurSupplierService {

    /**
     * 批量创建或更新供应商
     *
     * @param supplierParamList
     * @return
     * @throws Exception
     */
    ChannelResult syncSupplierList(List<SupplierParam> supplierParamList) throws Exception;

    /**
     * 批量创建或更新供应商银行信息
     *
     * @param supplierBankParamList
     * @return
     * @throws Exception
     */
    ChannelResult syncSupplierBnakList(List<SupplierBankParam> supplierBankParamList) throws Exception;

    /**
     * 批量创建或更新供应商联系人信息
     *
     * @param supplierUserParamList
     * @return
     * @throws Exception
     */
    ChannelResult syncSupplierUserList(List<SupplierUserParam> supplierUserParamList) throws Exception;

    /**
     * 根据社会统一信用编码获取供应商详情
     *
     * @param supplierByCodeParam
     * @return
     * @throws Exception
     */
    ChannelResult<SupplierModel> getSupplierByCreditCode(SupplierByCodeParam supplierByCodeParam);

    /**
     * 根据社会统一信用编码获取供应商银行详情
     *
     * @param supplierBankByCodeParam
     * @return
     * @throws Exception
     */
    ChannelListResult<SupplierBankModel> getSupplierBankByCreditCode(SupplierBankByCodeParam supplierBankByCodeParam);

    /***
     * @Author xuhui
     * @Description 根据社会统一信用编码获取供应商联系人详情
     * @Date 14:30 2021/5/17
     * @Param [creditCode]
     * @return com.sunyur.tailor.channel.common.middle.base.ChannelResult<java.util.List<com.sunyur.tailor.channel.service.inner.supplier.model.SupplierUserModel>>
     **/
    ChannelResult<List<SupplierUserModel>> getSupplierUserByCreditCode(String creditCode) throws Exception;

    /***
     * @Author xuhui
     * @Description 02-获取供应商信息_Code调用【已上线】
     * @Wiki http://doc.sunyur.com/pages/viewpage.action?pageId=279708183
     * @Date 14:30 2021/5/17
     **/
    ChannelResult<SupplierModel> getByCode(String code) throws Exception;

    /***
     * @Author xuhui
     * @Description 06-供应商认证工单详情接口【已上线】
     * @Wiki http://doc.sunyur.com/pages/viewpage.action?pageId=243367994
     * @Date 14:30 2021/5/17
     **/
    ChannelResult<SupplierAuthModel> getSupplierAuth(String purCode) throws Exception;

    /***
     * @Author xuhui
     * @Description 09-供应商信息变更工单详情接口【已上线】
     * @Wiki http://doc.sunyur.com/pages/viewpage.action?pageId=243368292
     * @Date 14:30 2021/5/17
     **/
    ChannelResult<SupplierInfoChangeModel> getSupplierInfoChange(String purCode) throws Exception;

    /***
     * @Author xuhui
     * @Description 08-供应商状态变更工单详情接口【已上线】
     * @Wiki http://doc.sunyur.com/pages/viewpage.action?pageId=243368283
     * @Date 14:30 2021/5/17
     **/
    ChannelResult<SupplierStatusChangeModel> getStatusChange(String purCode) throws Exception;

    /***
     * @Author xuhui
     * @Description 09-根据条件查询供应商
     * @Wiki http://doc.sunyur.com/pages/viewpage.action?pageId=343048197
     * @Date 14:30 2021/5/17
     **/
    ChannelListResult<SupplierModel> querySupplier(SupplierQueryParam supplierQueryParam) throws Exception;

    /***
     * @Author xuhui
     * @Description 03-2 按供应商获取供货品类
     * @Wiki http://doc.sunyur.com/pages/viewpage.action?pageId=186220765
     * @Date 14:30 2021/5/17
     **/
    ChannelListResult<SupplyCategoryModel> getRelBySupplierCode(SupplierByCodeParam param) throws Exception;

    /***
     * @Author xuhui
     * @Description 03-3 获取供货品类基础数据
     * @Wiki http://doc.sunyur.com/pages/viewpage.action?pageId=186220767
     * @Date 14:30 2021/5/17
     **/
    ChannelListResult<SupplyCategoryModel> getRelBySupplyCategoryCode(SupplyCategoryParam param) throws Exception;

}
